#include "poliarestas.h"

PoliArestas::PoliArestas(const QList<Point>& v, const QList< QSet<int> >& a) : vertices(v), arestas(a){}

void PoliArestas::draw()
{
    // Cor e tamanho da linha:
    glColor3f(1.0,0.0,0.0);
    glLineWidth(1.5);

    for (int i=0 ; i<arestas.size() ; i++)
    {
        foreach(const int& adj,arestas[i].toList())
        {
            glBegin(GL_LINES);
                glVertex2f(vertices[i](0),vertices[i](1));
                glVertex2f(vertices[adj](0),vertices[adj](1));
            glEnd();
        }
    }
}
